package com.dcm.live.mapper;

import com.dcm.live.bean.OrderBean;
import com.dcm.live.entity.LiveItemEntity;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @author 牛浩
 */
@Component
public interface LiveBuyMapper {
    /**
     * 根据id查询
     * @param id
     * @return
     */
    LiveItemEntity findById(Long id);

    /**
     * 查询全部直播商品
     * @return
     */
    List<LiveItemEntity> findAll();

    /**
     * 根据id搜索集合
     * @param id
     * @return
     */
    List<LiveItemEntity> search(Long id);

    /**
     * 添加订单
     * @param orderBean
     */
    void shopBuy(@RequestBody OrderBean orderBean);
}
